package com.tarena.charging.order.pojo.entity;

import io.github.classgraph.json.Id;
import java.math.BigDecimal;
import lombok.AccessLevel;
import lombok.Data;
import lombok.experimental.FieldDefaults;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
import org.springframework.data.elasticsearch.annotations.Setting;

@Data
@FieldDefaults(level = AccessLevel.PRIVATE)
@Document(indexName="charging_process_index")
@Setting(shards=1,replicas = 0)
public class ChargingProcessEntity {
    @Id
    @Field(type= FieldType.Long)
    Long id;//时间序列 当做文档的id使用
    /**
     * 关联业务
     */
    @Field(type= FieldType.Keyword)
    String billId;
    @Field(type= FieldType.Integer)
    Integer userId;
    /**
     * 关联设备
     */
    @Field(type= FieldType.Integer)
    Integer stationId;
    @Field(type= FieldType.Integer)
    Integer gunId;
    /**
     * 设备数据
     * 充电读书要叠加
     */
    @Field(type= FieldType.Float)
    Float chargingCapacity;
    @Field(type= FieldType.Double)
    BigDecimal totalCost;
    @Field(type= FieldType.Float)
    Float temperture;
    @Field(type= FieldType.Boolean)
    Boolean isFull;
}
